package com.party.core.dao.read.help;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.help.Help;
import com.party.core.model.help.HelpOutput;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 帮助
 */
@Repository
public interface HelpReadDao extends BaseReadDao<Help> {

    List<Help> webListPage(@Param("help") Help help, @Param("params") Map<String, Object> params, Page page);

    List<Help> webListPage2(@Param("help") Help help, @Param("params") Map<String, Object> params, Page page);

    Integer getMaxSort(Help help);

    List<Help> titleList(Page page);

    /***
     * 根据标题查询
     * @param title
     * @return
     */
    Help getByTitle(String title);

    /***
     * 根据标题查询二级对象
     * @param help
     * @return
     */
    Help getByTwoClassifyTitle(@Param("help") Help help);

    /***
     * 众筹攻略查询
     * @return
     */
    Help getPublicStrategy();

    /***
     * 常见问题查询
     * @return
     */
    List<HelpOutput> commonProblemList(Page page);


    /***
     * 常见问题二级分类详情查询
     * @return
     */
    Help details(String id);

    /***
     * 获取带条件查询的二级Help
     * @return
     */
    List<Help> twoList(@Param("help")Help help);

    /***
     * 获取带条件查询的一级Help
     * @return
     */
    List<Help> parentList(@Param("help")Help help, Page page);

    /***
     * 根据父id查询   众筹攻略  特殊
     * @return
     */
    Help getparentId(@Param("id")String id);
}
